![]() |
GetThemeMenuBarHeight |
||||
Header: | Appearance.h | Carbon status: | Supported | |
Obtains the height of a menu bar.
OSStatus GetThemeMenuBarHeight ( SInt16 *outHeight );
A pointer to a signed 16-bit integer. On return, the integer value represents the height (in pixels) of the menu bar.
A result code.
The GetThemeMenuBarHeight function obtains the specified height of a menu bar in the current theme. This is in contrast to the Menu Manager function GetMBarHeight, which obtains the actual space that the menu bar is currently occupying on the screen. In most instances, the values produced by these two functions are the same. But, when the menu bar is hidden, GetMBarHeight produces a value of 0, and GetThemeMenuBarHeight still provides the “ideal” menu bar height.
Because menu bar heights may vary among appearances by one or more pixels, you should check the current menu bar height after a theme switch. Specifically, your application should respond to the theme-switch Apple event, kAEAppearanceChanged, by checking the current menu bar height. See
It is important to check the menu bar height before positioning any windows. Failure to do so may result in the menu bar overlapping your application’s windows.
This function is available with Appearance Manager 1.0.1 and later.
Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.
© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)